package com.jiaai.util.code_pack;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

/**
 * class_name:TipsProperties
 * describe:------------------>错误提示语
 * create_user:张昉平
 * create_date:2018/1/30
 * create_time:17:18
 */
public class TipsProperties {

    private static Properties properties;

    static {
        Properties prop = new Properties();

        InputStream in = TipsProperties.class.getClassLoader().getResourceAsStream(
                "tips.properties");
        try {
            prop.load(new InputStreamReader(in, "utf-8"));
            properties = prop;
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        System.out.println(properties);
    }

    public static Properties getProperties(){
        return properties;
    }

    public static String getTip(String hint){
        return properties.getProperty(hint);
    }

}
